#ifndef __MAIN_PAGE_H__
#define __MAIN_PAGE_H__
#include "game_manager.h"
#include "game_map.h"

class GameManager;
class MainPage : public BasePage
{
    MainPage(GameManager *game_manager, Lcd *lcd) : gameManager(game_manager), lcd(lcd), bg("./res/main_page.bmp") {}

public:
    // 重写基类方法
    bool handleTouch(const Point &touch_point) override;
    void show() override;
    void hide() override;

    void continueGame();
    void startNewGame();

    // 创建和删除实例
    static MainPage *instance(GameManager *gameManager, Lcd *lcd);
    static void delInstance();

private:
    static MainPage *m_instance; // 单例模式
    GameManager *gameManager;
    Lcd *lcd;
    BMP bg;
};

#endif